package com.usercar.controller;


import com.dk.bean.Result;
import com.dk.em.ResultEnum;
import com.usercar.pojo.MessageLabel;
import com.usercar.service.IMessageLabelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2021-08-13
 */
@Controller
@RequestMapping("/usercar/messageLabel")
@Api("车辆信息和标签统一接口")
public class MessageLabelController {

    @Autowired
    private IMessageLabelService iMessageLabelService;

    @ApiOperation("根据车辆id查询")
    @GetMapping("/{messageId}")
    public Result selectByMessageId(@PathVariable("messageId")Long messageId){
        List<MessageLabel> list = iMessageLabelService.selectByMessageId(messageId);
        return Result.buildResult(ResultEnum.SUCCESS);
    }
}

